package net.yunzhanyi.client.service;


import net.yunzhanyi.client.domain.dto.ClientLoginUser;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author qiuxin
 * @code TokenService
 * @date 2022/3/29
 * description：
 */
public interface TokenService {

    /**
     * 生成token
     * @return
     * @param loginUser
     */
    String createToken(ClientLoginUser loginUser);


    /**
     * 验证token
     *
     */
    boolean verifyToken(String token,HttpServletRequest request, HttpServletResponse response);


    /**
     * 删除token
     * @param token
     */
    void deleteToken(String token);

    /**
     * 获取uid
     * @param request
     */
    void accountPublic(HttpServletRequest request);

    /**
     *
     */
    public String getToken(HttpServletRequest request);
    public String getWebToken(HttpServletRequest request);

    public ClientLoginUser parseWebToken(String token);
}
